<template>
	<view class="pageAll">
		<fui-tabbar :tabBar="tabs" :fontWeight="500" :current="currentPage" selectedColor='#35743D' @click="itemClick"></fui-tabbar>
	</view>
</template>

<script>
	export default {
		props: {
			currentPage: {
				type: Number,
				default: 0
			}
		},
		components: {

		},
		data() {
			return {
				//数据格式一
				tabs: [{
					text: '首页',
					iconPath: '/static/images/tabs/shouye.png',
					selectedIconPath: '/static/images/tabs/shouye1.png',
					path: "/pages/home/home",
				}, {
					text: '订单',
					iconPath: '/static/images/tabs/order.png',
					selectedIconPath: '/static/images/tabs/order1.png',
					path: "/pages/order/index",
				}, {
					text: '我的',
					iconPath: '/static/images/tabs/mine.png',
					selectedIconPath: '/static/images/tabs/mine1.png',
					path: "/pages/my/index",
				}]
			}
		},

		methods: {
			itemClick(e) {
				uni.switchTab({
					url: e.path
				});
			}
		}
	}
</script>

<style lang="scss" scoped>

</style>
